900
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oGantt:Columns():Add("Date")
			oColumn:SortType := 2/*SortDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:DisplayFilterDate := .T.
			oColumn:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn1 := oGantt:Columns():Add("DateTime")
			oColumn1:SortType := 3/*SortDateTime*/
			oColumn1:DisplayFilterButton := .T.
			oColumn1:DisplayFilterPattern := .F.
			oColumn1:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn2 := oGantt:Columns():Add("Time")
			oColumn2:SortType := 4/*SortTime*/
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
			oColumn2:FormatColumn := "time(value)"
		oColumn3 := oGantt:Columns():Add("Numeric")
			oColumn3:SortType := 1/*SortNumeric*/
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn4 := oGantt:Columns():Add("String")
			oColumn4:DisplayFilterButton := .T.
			oColumn4:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oItems := oGantt:Items()
			h := oItems:AddItem("01/27/2010")
			oItems:SetProperty("CellCaption",h,1,"01/27/2010 10:00:00")
			oItems:SetProperty("CellCaption",h,2,oItems:CellCaption(h,1))
			oItems:SetProperty("CellCaption",h,3,1)
			oItems:SetProperty("CellCaption",h,4,oItems:CellCaption(h,3))
			h := oItems:AddItem("01/27/2011")
			oItems:SetProperty("CellCaption",h,1,"01/27/2011 09:00:00")
			oItems:SetProperty("CellCaption",h,2,oItems:CellCaption(h,1))
			oItems:SetProperty("CellCaption",h,3,11)
			oItems:SetProperty("CellCaption",h,4,oItems:CellCaption(h,3))
			h := oItems:AddItem("11/02/2010")
			oItems:SetProperty("CellCaption",h,1,"11/02/2010 09:00:00")
			oItems:SetProperty("CellCaption",h,2,oItems:CellCaption(h,1))
			oItems:SetProperty("CellCaption",h,3,2)
			oItems:SetProperty("CellCaption",h,4,oItems:CellCaption(h,3))
		oGantt:Columns:Item("DateTime"):DisplayFilterDate := .F.
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
899
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oGantt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oGantt:Columns():Add("P2")
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:PartialCheck := .T.
			oColumn1:FormatColumn := "1 index ``"
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child A")
			oItems:InsertItem(h,,"Child B")
			oItems:InsertItem(h,,"Child A")
			oItems:InsertItem(h,,"Child B")
			oItems:AddItem("Root")
			oItems:AddItem("Root")
		oGantt:SingleSort := .F.
		oGantt:Layout := "multiplesort=" + CHR(34) + "C0:1 C1:2" + CHR(34) + ";collapse=" + CHR(34) + "" + CHR(34) + ""
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
898
How can I get ride / hide the image being dragged by OLE Drag and Drop
PROCEDURE OnOLEStartDrag(oGantt,Data,AllowedEffects)
	/*Data.SetData("data to drag")*/
	AllowedEffects := 1
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oGantt,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oGantt:OLEDropMode := 1/*exOLEDropManual*/
		oGantt:SetProperty("Background",34/*exDragDropAfter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:Columns():Add("Default")
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
897
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:DrawGridLines := -2/*exRowLines*/
		oGantt:AutoDrag := 3/*exAutoDragPositionAny*/
		oGantt:HasLines := 1/*exSolidLine*/
		oGantt:Indent := 16
		oGantt:MarkSearchColumn := .F.
		oColumns := oGantt:Columns()
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn:FormatColumn := "((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value"
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
896
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oGantt:DrawGridLines := -2/*exRowLines*/
		oGantt:AutoDrag := 3/*exAutoDragPositionAny*/
		oGantt:HasLines := 1/*exSolidLine*/
		oGantt:Indent := 16
		oColumns := oGantt:Columns()
			oColumns:Add("Default")
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn:SetProperty("Def",49/*exCellPaddingRight*/,4)
				oColumn:AllowSizing := .F.
				oColumn:Width := 36
				oColumn:Position := 0
				oColumn:FormatColumn := "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:1) ) "
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
895
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:DrawGridLines := -2/*exRowLines*/
		oGantt:AutoDrag := 3/*exAutoDragPositionAny*/
		oGantt:HasLines := 1/*exSolidLine*/
		oGantt:Indent := 16
		oColumns := oGantt:Columns()
			oColumns:Add("Default")
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn:SetProperty("Def",49/*exCellPaddingRight*/,4)
				oColumn:Alignment := 2/*RightAlignment*/
				oColumn:AllowSizing := .F.
				oColumn:Width := 24
				oColumn:Position := 0
				oColumn:FormatColumn := "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) "
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
894
Is it possible to have a different alignment for parts of the cell's caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:TreeColumnIndex := -1
		oGantt:DrawGridLines := -2/*exRowLines*/
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oGantt:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oItems := oGantt:Items()
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-left"),0,0/*LeftAlignment*/)
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-center"),0,1/*CenterAlignment*/)
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-right"),0,2/*RightAlignment*/)
			h := oItems:AddItem("left<c>center<r>right")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
893
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oGantt:Columns()
			oColumn := oColumns:Add("MultipleLine")
				oColumn:Width := 32
				oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
				oColumn:SetProperty("Def",64/*exColumnResizeContiguously*/,.T.)
			oColumn1 := oColumns:Add("SingleLine")
				oColumn1:SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("This is a bit of long text that should break the line"),1,"This is a bit of long text that should break the line")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
892
How do I sort the index column as numeric

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:SetProperty("CellData",Item,1,oItems:ItemToIndex(Item))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:DrawGridLines := -1/*exAllLines*/
		oGantt:ColumnAutoResize := .T.
		oGantt:ShowFocusRect := .F.
		oColumn := oGantt:Columns():Add("Next")
			oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,4)
			oColumn:SetProperty("Def",52/*exHeaderPaddingLeft*/,4)
		oColumn1 := oGantt:Columns():Add("Index")
			oColumn1:AllowSizing := .F.
			oColumn1:Width := 48
			oColumn1:FormatColumn := "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"
			oColumn1:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn1:SortType := 5/*SortUserData*/
			oColumn1:Position := 0
		oItems := oGantt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:AddItem("Item 4")
			oItems:AddItem("Item 5")
			oItems:AddItem("Item 6")
			oItems:AddItem("Item 7")
			oItems:AddItem("Item 8")
			oItems:AddItem("Item 9")
			oItems:AddItem("Item 10")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
891
How can I put icons/images into buttons

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .T.
		oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oGantt:Columns():Add("C+B")
			oColumn:AllowSizing := .F.
			oColumn:Width := 48
			oColumn:FormatColumn := "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
			oColumn:SetProperty("Def",3/*exCellButtonAutoWidth*/,.T.)
		oGantt:Columns():Add("")
		oGantt:DrawGridLines := 2/*exVLines*/
		oGantt:DefaultItemHeight := 20
		oItems := oGantt:Items()
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
890
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

PROCEDURE OnCellButtonClick(oGantt,Item,ColIndex)
	DevOut( "CellButtonClick" )
	DevOut( Transform(Item,"") )
RETURN

PROCEDURE OnCellStateChanged(oGantt,Item,ColIndex)
	DevOut( "CellStateChanged" )
	DevOut( Transform(Item,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:CellButtonClick := {|Item,ColIndex| OnCellButtonClick(oGantt,Item,ColIndex)} /*Fired after the user clicks on the cell of button type. */
		oGantt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oGantt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .T.
		oColumn := oGantt:Columns():Add("")
			oColumn:AllowSizing := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 index ``"
		oColumn1 := oGantt:Columns():Add("Def")
			oColumn1:AllowSizing := .F.
			oColumn1:Width := 48
			oColumn1:FormatColumn := "`     `"
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:SetProperty("Def",2/*exCellHasButton*/,.T.)
			oColumn1:SetProperty("Def",3/*exCellButtonAutoWidth*/,.T.)
		oGantt:Columns():Add("")
		oItems := oGantt:Items()
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
889
Does filtering work with umlauts / accents characters
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oGantt:Columns():Add("Names")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 3/*exPattern*/
		oItems := oGantt:Items()
			oItems:AddItem("Mantel")
			oItems:AddItem("Mechanik")
			oItems:AddItem("Motor")
			oItems:AddItem("Murks")
			oItems:AddItem("Märchen")
			oItems:AddItem("Möhren")
			oItems:AddItem("Mühle")
			oItems:AddItem("Sérigraphie")
		oGantt:Columns:Item(0):Filter := "*ä*"
		oGantt:ApplyFilter()
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
888
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .T.
		oGantt:ContinueColumnScroll := .F.
		oGantt:MarkSearchColumn := .F.
		oGantt:SearchColumnIndex := 1
		oGantt:FilterBarHeight := 0
		oGantt:FilterBarPromptVisible := -1/*0xffffc0e8+exFilterBarTop+exFilterBarShort+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oGantt:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oGantt:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oGantt:FilterBarPromptPattern := "London"
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
887
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:SetParent(Item,oItems:FindItem(oItems:CellCaption(Item,"ReportsTo"),"EmployeeID"))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access\SAMPLE.MDB",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Items():SetProperty("ExpandItem",0,.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
886
The week number is not correct. What can I do

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:FirstWeekDay := oChart:LocFirstWeekDay()
			oChart:MonthNames := oChart:LocMonthNames()
			oChart:WeekDays := oChart:LocWeekDays()
			oChart:AMPM := oChart:LocAMPM()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:UnitScale := 256/*exWeek*/
			oChart:UnitWidth := 32
			oChart:FirstVisibleDate := "01/01/2016"
			oChart:WeekNumberAs := 0/*exISO8601WeekNumber*/
			oChart:ScrollTo(oChart:FirstVisibleDate(),1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
885
How can I display my logo on print/print-preview

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Chart():FirstVisibleDate := "08/04/1994"
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:PageOrientation := 2/*exLandscape*/
			oPrint:SetProperty("HTMLPicture","logo","c:\exontrol\images\zipdisk.gif")
			oPrint:ExtraCaption("logo","<img>logo</img>",1,1)
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
884
How can I align captions of items with checkbox, with items with no checkbox

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Default")
		oItems := oGantt:Items()
			oItems:SetProperty("CellImages",oItems:AddItem(0),0,"1")
			oItems:SetProperty("CellHasCheckBox",oItems:AddItem(1),0,.T.)
			oItems:SetProperty("CellImages",oItems:AddItem(2),0,"1")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
883
How do I show the chart's labels in 24-hour clock format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oLevel,oLevel1,oLevel2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 3
			oLevel := oChart:Level(0)
				oLevel:Label := "<%mmm%> <%d%>, <%yyyy%>"
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
				oLevel:Unit := 4096/*exDay*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<b><%h%>:00</b>"
				oLevel1:Alignment := 1/*CenterAlignment*/
				oLevel1:Unit := 65536/*exHour*/
				oLevel1:DrawTickLines := .T.
				oLevel1:DrawGridLines := .T.
			oLevel2 := oChart:Level(2)
				oLevel2:Label := "<%nn%>"
				oLevel2:Unit := 1048576/*exMinute*/
				oLevel2:Count := 15
			oChart:ScrollTo("01/01/2001 08:30:00",0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
882
How do I show the chart's labels in 12-hour clock format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oLevel,oLevel1,oLevel2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 3
			oLevel := oChart:Level(0)
				oLevel:Label := "<%mmm%> <%d%>, <%yyyy%>"
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
				oLevel:Unit := 4096/*exDay*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<b><%h%>:00</b> <%AM/PM%>"
				oLevel1:Alignment := 1/*CenterAlignment*/
				oLevel1:Unit := 65536/*exHour*/
				oLevel1:DrawTickLines := .T.
				oLevel1:DrawGridLines := .T.
			oLevel2 := oChart:Level(2)
				oLevel2:Label := "<%nn%>"
				oLevel2:Unit := 1048576/*exMinute*/
				oLevel2:Count := 15
			oChart:ScrollTo("01/01/2001 08:30:00",0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
881
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
PROCEDURE OnMouseDown(oGantt,Button,Shift,X,Y)
	/*Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))*/

RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:MouseDown := {|Button,Shift,X,Y| OnMouseDown(oGantt,Button,Shift,X,Y)} /*Occurs when the user presses a mouse button.*/

		oGantt:BeginUpdate()
		oGantt:TreeColumnIndex := -1
		oGantt:SetProperty("SelForeColor",oGantt:ForeColor())
		oColumn := oGantt:Columns():Add("Buttons")
			oColumn:Alignment := 1/*CenterAlignment*/
			oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
		oItems := oGantt:Items()
			oItems:AddItem("Button A")
			oItems:AddItem("Button B")
			oItems:AddItem("Button C")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
880
Do you have any Fit-To-Page options when printing the control (W x T, Fit-To )

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Chart():FirstVisibleDate := "08/04/1994"
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage =1 x 2"
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
879
Do you have any Fit-To-Page options when printing the control ( x T, Fit-To Tall )

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Chart():FirstVisibleDate := "08/04/1994"
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage = x 2"
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
878
Do you have any Fit-To-Page options when printing the control ( W x, Fit-To Wide )

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Chart():FirstVisibleDate := "08/04/1994"
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage = 2 x"
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
877
Do you have any Fit-To-Page options when printing the control ( percent view, Adjust-To )

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Chart():FirstVisibleDate := "08/04/1994"
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage = 50%"
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
876
Does the title of the cell's tooltip supports HTML format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oGantt:Columns():Add("")
			oColumn:Caption := ""
			oColumn:HTMLCaption := "Column"
		oItems := oGantt:Items()
			oItems:SetProperty("CellToolTip",oItems:AddItem("tooltip w/h different title"),0,"<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the title centered with a different color.")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
875
How do I specify a different title for the cell's tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oGantt:Columns():Add("")
			oColumn:Caption := "This is the title"
			oColumn:HTMLCaption := "Column"
		oItems := oGantt:Items()
			oItems:SetProperty("CellToolTip",oItems:AddItem("tooltip w/h different title"),0,"This is bit of text that's shown when the user hovers the cell.")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
874
The cell's tooltip displays the column's caption in its title. How can I get ride of that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oGantt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
		oItems := oGantt:Items()
			h := oItems:AddItem("tooltip w/h caption")
			oItems:SetProperty("CellToolTip",h,0,"This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title.")
			oItems:SetProperty("CellCaption",h,1,"tooltip no caption")
			oItems:SetProperty("CellToolTip",h,1,"This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title.")
		oColumn := oGantt:Columns():Item("C2")
			oColumn:HTMLCaption := oColumn:Caption()
			oColumn:Caption := ""
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
873
How can I programmatically show the column's filter

PROCEDURE OnRClick(oGantt)
	LOCAL i
	i := oGantt:ItemFromPoint(-1,-1,c,hit)
	oGantt:Columns:Item(c):ShowFilter("-1,-1,128,128")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:RClick := {|| OnRClick(oGantt)} /*Fired when right mouse button is clicked*/

		oGantt:BeginUpdate()
		oGantt:ShowFocusRect := .F.
		oColumn := oGantt:Columns():Add("Items ")
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oItems := oGantt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
872
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

PROCEDURE OnColumnClick(oGantt,Column)
	/*Column.SortOrder = 1*/
	oGantt:SortOnClick := -1/*exDefaultSort*/
	oGantt:Columns:Item("Sort"):SortOrder := 1/*SortAscending*/
	oGantt:SortOnClick := 1/*exUserSort*/
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnClick := {|Column| OnColumnClick(oGantt,Column)} /*Fired after the user clicks on column's header.*/

		oGantt:BeginUpdate()
		oGantt:MarkSearchColumn := .F.
		oGantt:SortOnClick := 1/*exUserSort*/
		oGantt:Columns():Add("Items")
		oGantt:Columns():Add("Sort"):Visible := .F.
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 1 (3)"),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 2 (1)"),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 3 (2)"),1,2)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
871
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

PROCEDURE OnColumnClick(oGantt,Column)
	/*Column.SortOrder = 1*/
	oGantt:Items():SortChildren(0,"Sort",.T.)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnClick := {|Column| OnColumnClick(oGantt,Column)} /*Fired after the user clicks on column's header.*/

		oGantt:BeginUpdate()
		oGantt:MarkSearchColumn := .F.
		oGantt:SortOnClick := 1/*exUserSort*/
		oGantt:Columns():Add("Items")
		oGantt:Columns():Add("Sort"):Visible := .F.
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 1 (3)"),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 2 (1)"),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 3 (2)"),1,2)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
870
How can I sort by two-columns, one by date and one by time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:SingleSort := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Index"):FormatColumn := "1 index ``"
			oColumns:Add("Date"):SortType := 2/*SortDate*/
			oColumn := oColumns:Add("Time")
				oColumn:SortType := 4/*SortTime*/
				oColumn:FormatColumn := "time(value)"
		oItems := oGantt:Items()
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"01/01/2001")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 10:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"12/31/2000")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 10:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"01/01/2001")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 06:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"12/31/2000")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 08:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"01/01/2001")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 08:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"12/31/2000")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 06:00:00")
		oGantt:Layout := "multiplesort=" + CHR(34) + "C1:1 C2:1" + CHR(34) + ""
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
869
How can I connect to a DBF file
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADODB.Recordset")
			rs:Open("Select * From foxcode.DBF","Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
868
How can I change the bar's color based on values on the columns

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oConditionalFormat,oConditionalFormat1,oConditionalFormat2
	LOCAL oConditionalFormats
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oConditionalFormats := oGantt:ConditionalFormats()
			oConditionalFormat := oConditionalFormats:Add("1")
				oConditionalFormat:ApplyTo := 1/*0x1+*/
				oConditionalFormat:Bold := .T.
				oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
			oConditionalFormat1 := oConditionalFormats:Add("%1 = 5")
				oConditionalFormat1:ApplyToBars := "Task"
				oConditionalFormat1:SetProperty("BarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oConditionalFormat1:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oConditionalFormat1:SetProperty("BarOverviewColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat2 := oConditionalFormats:Add("%1 = 3")
				oConditionalFormat2:ApplyToBars := "Task"
				oConditionalFormat2:SetProperty("BarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
				oConditionalFormat2:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
				oConditionalFormat2:SetProperty("BarOverviewColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
867
Does your control supports scrolling by touching the screen

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:ContinueColumnScroll := .T.
		oGantt:ScrollBySingleLine := .T.
		oGantt:AutoDrag := 4112/*exAutoDragScrollOnShortTouch+exAutoDragScroll*/
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
866
How can I export the control's content to a PDF document (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oPrint
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:MarkSearchColumn := .F.
		oGantt:Columns():Add("Tasks")
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:LevelCount := 2
			oChart:ShowEmptyBars := 1
			oChart:FirstVisibleDate := "01/01/2009"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2009","01/07/2009")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2009","01/09/2009")
		oPrint := CreateObject("Exontrol.Print")
			oPrint:PrintExt := oGantt
			oPrint:CopyTo("c:/temp/xtest.pdf")
		DevOut( "Look for C:\Temp\xtest.pdf file." )
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
865
How can I export the control's content to a PDF document (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL var_CopyTo

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:MarkSearchColumn := .F.
		oGantt:Columns():Add("Tasks")
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:LevelCount := 2
			oChart:ShowEmptyBars := 1
			oChart:FirstVisibleDate := "01/01/2009"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2009","01/07/2009")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2009","01/09/2009")
		var_CopyTo := oGantt:CopyTo("c:/temp/xtest.pdf")
		DevOut( "Look for C:\Temp\xtest.pdf file." )
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
864
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

PROCEDURE OnCellStateChanged(oGantt,Item,ColIndex)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:SetProperty("CellCaption",Item,2,oItems:CellState(Item,0))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL var_ConditionalFormat
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oGantt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oGantt:BeginUpdate()
		oGantt:ShowFocusRect := .F.
		oGantt:SelBackMode := 1/*exTransparent*/
		var_ConditionalFormat := oGantt:ConditionalFormats:Add("%2 != 0")
			var_ConditionalFormat:Bold := .T.
			var_ConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			var_ConditionalFormat:ApplyTo := -1/*exFormatToItems*/
		oColumn := oGantt:Columns():Add("")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:Width := 16
			oColumn:AllowSizing := .F.
		oGantt:Columns():Add("Information")
		oGantt:Columns():Add("Hidden"):Visible := .F.
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem(""),1,"This is a bit of text associated")
			h := oItems:AddItem("")
			oItems:SetProperty("CellCaption",h,1,"This is a bit of text associated")
			oItems:SetProperty("CellState",h,0,1)
			oItems:SetProperty("CellCaption",oItems:AddItem(""),1,"This is a bit of text associated")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
863
How can I use no scroll bars for touch-screens

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:AutoDrag := 16/*exAutoDragScroll*/
		oGantt:ScrollWidth := 4
		oGantt:ScrollHeight := 4
		oGantt:SetProperty("Background",384/*exHSLeft*/,AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
		oGantt:SetProperty("Background",392/*exHSRight*/,AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
		oGantt:SetProperty("Background",404/*exHSBack*/,AutomationTranslateColor( GraMakeRGBColor  ( { 224,224,224 } )  , .F. ))
		oGantt:SetProperty("Background",388/*exHSThumb*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oGantt:SetProperty("Background",276/*exVSBack*/,AutomationTranslateColor( GraMakeRGBColor  ( { 224,224,224 } )  , .F. ))
		oGantt:SetProperty("Background",264/*exVSDown*/,AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
		oGantt:SetProperty("Background",260/*exVSThumb*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oGantt:SetProperty("Background",256/*exVSUp*/,AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
		oGantt:ScrollButtonWidth := 0
		oGantt:ScrollButtonHeight := 0
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
862
How can I print the selected items only

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL oItems
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:SingleSel := .F.
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Chart():FirstVisibleDate := "08/04/1994"
		oItems := oGantt:Items()
			oItems:SetProperty("SelectItem",oItems:ItemByIndex(0),.T.)
			oItems:SetProperty("SelectItem",oItems:ItemByIndex(2),.T.)
			oItems:SetProperty("SelectItem",oItems:ItemByIndex(4),.T.)
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "Print = Selection"
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
861
How can I sort the columns to be displayed on the columns floating bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("City"):Visible := .F.
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/
		oGantt:ColumnsFloatBarSortOrder := 1/*SortAscending*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
860
How can I add a vertical padding

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:DrawGridLines := -1/*exAllLines*/
		oColumn := oGantt:Columns():Add("Padding")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
			oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,6)
			oColumn:SetProperty("Def",49/*exCellPaddingRight*/,6)
			oColumn:SetProperty("Def",50/*exCellPaddingTop*/,6)
			oColumn:SetProperty("Def",51/*exCellPaddingBottom*/,6)
		oItems := oGantt:Items()
			oItems:AddItem("padding")
			oItems:AddItem("padding")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
859
How do you embed HTML options into the anchor click string

PROCEDURE OnAnchorClick(oGantt,AnchorID,Options)
	DevOut( Transform(AnchorID,"") )
	DevOut( Transform(Options,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AnchorClick := {|AnchorID,Options| OnAnchorClick(oGantt,AnchorID,Options)} /*Occurs when an anchor element is clicked.*/

		oGantt:BeginUpdate()
		oColumns := oGantt:Columns()
			oColumns:Add("Car"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oGantt:Items()
			oItems:AddItem("<a mazda_1;options for 1>Mazda <b>1</b></a>")
			oItems:AddItem("<a mazda_2;options for 2>Mazda <b>2</b></a>")
			oItems:AddItem("<a mazda_3;options for 3a>Mazda <b>3.a</b></a>")
			oItems:AddItem("<a mazda_3;options for 3b>Mazda <b>3.b</b></a>")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
858
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78egBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxLC8Mw3BDvYDkOAABAIgI=")
		oGantt:SetProperty("SelBackColor",0x1fffffe)
		oGantt:ShowFocusRect := .F.
		oGantt:Columns():Add("Items")
		oItems := oGantt:Items()
			oItems:SetProperty("ItemBackColor",oItems:AddItem("red"),AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("blue"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("green"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
857
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:SelBackMode := 1/*exTransparent*/
		oGantt:ShowFocusRect := .F.
		oGantt:Columns():Add("Items")
		oItems := oGantt:Items()
			oItems:SetProperty("ItemBackColor",oItems:AddItem("red"),AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("blue"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("green"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
856
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:SetProperty("SelBackColor",oGantt:BackColor())
		oGantt:SetProperty("SelForeColor",oGantt:ForeColor())
		oGantt:ShowFocusRect := .T.
		oGantt:Columns():Add("Items")
		oItems := oGantt:Items()
			oItems:SetProperty("ItemBackColor",oItems:AddItem("red"),AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("blue"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("green"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
855
Do you have any Fit-To-Page options when printing the control

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oPrint
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:Chart():FirstVisibleDate := "08/04/1994"
		oGantt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage = On"
			oPrint:PrintExt := oGantt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
854
How can I add a footer row

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ShowLockedItems := .T.
		oGantt:DrawGridLines := 2/*exVLines*/
		oGantt:Columns():Add("C1")
		oGantt:Columns():Add("C2")
		oItems := oGantt:Items()
			oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,1)
			h := oItems:LockedItem(2/*BottomAlignment*/,0)
			oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
			oItems:SetProperty("ItemForeColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
			oItems:SetProperty("CellCaption",h,0,"footer c1")
			oItems:SetProperty("CellCaption",h,1,"footer c2")
			oItems:SetProperty("CellCaption",oItems:AddItem("cell"),1,"cell")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
853
How can I add a header row

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ShowLockedItems := .T.
		oGantt:DrawGridLines := 2/*exVLines*/
		oGantt:Columns():Add("C1")
		oGantt:Columns():Add("C2")
		oItems := oGantt:Items()
			oItems:SetProperty("LockedItemCount",0/*TopAlignment*/,1)
			h := oItems:LockedItem(0/*TopAlignment*/,0)
			oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
			oItems:SetProperty("ItemForeColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
			oItems:SetProperty("CellCaption",h,0,"footer c1")
			oItems:SetProperty("CellCaption",h,1,"footer c2")
			oItems:SetProperty("CellCaption",oItems:AddItem("cell"),1,"cell")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
852
How can I programmatically add more columns to the sort bar and other to be sorted, but not included in the sort bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:SortBarVisible := .T.
		oColumns := oGantt:Columns()
			oColumns:Add(Transform(0,""))
			oColumns:Add(Transform(1,""))
			oColumns:Add(Transform(2,""))
			oColumns:Add(Transform(3,""))
			oColumns:Add(Transform(4,""))
		oGantt:Layout := "multiplesort=" + CHR(34) + "C3:1 C4:2" + CHR(34) + ";singlesort=" + CHR(34) + "C2:1" + CHR(34) + ""

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
851
How can I fix a column, while other sizable and fill the control's client
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .T.
		oGantt:Columns():Add("Sizable")
		oColumn := oGantt:Columns():Add("F")
			oColumn:AllowSizing := .F.
			oColumn:Width := 16

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
850
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumns := oGantt:Columns()
			oColumns:Add("Value")
			oColumn := oColumns:Add("CellSingleLine = False")
				oColumn:ComputedField := "%0"
				oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
			oColumn1 := oColumns:Add("FormatColumn/replace CRLF")
				oColumn1:ComputedField := "%0"
				oColumn1:FormatColumn := "value replace `\r\n` with ``"
			oColumn2 := oColumns:Add("FormatColumn/replace TAB,CRLF")
				oColumn2:ComputedField := "%0"
				oColumn2:FormatColumn := "(value replace `\t` with ``) replace `\r\n` with ``"
		oItems := oGantt:Items()
			oItems:AddItem("a\ta\r\nb\tb")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
849
Is there any way to "unselect" radio group

PROCEDURE OnDblClick(oGantt,Shift,X,Y)
	LOCAL oItems
	LOCAL h
	oItems := oGantt:Items()
		h := oItems:CellChecked(1234)
		oItems:SetProperty("CellHasCheckBox",0,h,.T.)
		oItems:SetProperty("CellState",0,h,0)
		oItems:SetProperty("CellHasCheckBox",0,h,.F.)
RETURN

PROCEDURE OnSelectionChanged(oGantt)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:SetProperty("CellState",oItems:FocusItem(),0,1)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:DblClick := {|Shift,X,Y| OnDblClick(oGantt,Shift,X,Y)} /*Occurs when the user dblclk the left mouse button over an object.*/
		oGantt:SelectionChanged := {|| OnSelectionChanged(oGantt)} /*Fired after a new item has been selected.*/

		oGantt:MarkSearchColumn := .F.
		oGantt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,128 } )  , .F. ))
		oGantt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oGantt:Columns():Add("Default")
		oItems := oGantt:Items()
			h := oItems:AddItem("Radio 1")
			oItems:SetProperty("CellHasRadioButton",h,0,.T.)
			oItems:SetProperty("CellRadioGroup",h,0,1234)
			h := oItems:AddItem("Radio 2")
			oItems:SetProperty("CellHasRadioButton",h,0,.T.)
			oItems:SetProperty("CellRadioGroup",h,0,1234)
			oItems:SetProperty("CellState",h,0,1)
			h := oItems:AddItem("Radio 3")
			oItems:SetProperty("CellHasRadioButton",h,0,.T.)
			oItems:SetProperty("CellRadioGroup",h,0,1234)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
848
The Column.Alignment property does not seem to work for cells with images in them. What can be done

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oGantt:TreeColumnIndex := -1
		oGantt:DrawGridLines := -1/*exAllLines*/
		oGantt:HeaderHeight := 24
		oGantt:DefaultItemHeight := 24
		oColumn := oGantt:Columns():Add("Image")
			oColumn:AllowSizing := .F.
			oColumn:Width := 32
			oColumn:HTMLCaption := "<img>1</img>"
			oColumn:HeaderAlignment := 1/*CenterAlignment*/
			oColumn:Alignment := 1/*CenterAlignment*/
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oGantt:Columns():Add("Rest")
		oItems := oGantt:Items()
			oItems:AddItem("<img>1</img>")
			oItems:AddItem("<img>2</img>")
			oItems:AddItem("<img>3</img>")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
847
Does your control support subscript or superscript, in HTML captions

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,64)
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","")
			oItems:SetProperty("ItemBar",h,"",3/*exBarCaption*/,"<sha ;;0>Event <b><font ;6><off -6>2<off 4>3<off 4>1")
			oItems:SetProperty("ItemBar",h,"",4/*exBarHAlignCaption*/,18)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
846
How do I arrange my columns on multiple levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:ColumnAutoResize := .F.
		oGantt:DrawGridLines := -1/*exAllLines*/
		oColumns := oGantt:Columns()
			oColumn := oColumns:Add("C0")
				oColumn:ExpandColumns := "1,2"
				oColumn:DisplayExpandButton := .F.
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumn1 := oColumns:Add("C4")
				oColumn1:ExpandColumns := "5,6"
				oColumn1:DisplayExpandButton := .F.
			oColumns:Add("C5")
			oColumn2 := oColumns:Add("C6")
				oColumn2:ExpandColumns := "6,7"
				oColumn2:DisplayExpandButton := .F.
			oColumns:Add("C7")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
845
Does your control support expandable header or columns, so I can arrange it on multiple levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:DrawGridLines := -1/*exAllLines*/
		oGantt:SetProperty("BackColorLevelHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oColumns := oGantt:Columns()
			oColumn := oColumns:Add("Photo")
				oColumn:AllowSizing := .F.
				oColumn:Width := 32
			oColumns:Add("Personal Info")
			oColumns:Add("Title")
			oColumns:Add("Name")
			oColumns:Add("First")
			oColumns:Add("Last")
			oColumns:Add("Address")
			oColumns:Item("Personal Info"):ExpandColumns := "2,3"
			oColumn1 := oColumns:Item("Name")
				oColumn1:ExpandColumns := "4,5"
				oColumn1:Expanded := .F.
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
844
Can I change the format of date to be shown in the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oGantt:Columns()
			oColumns:Add("Default")
			oColumn := oColumns:Add("Format.1")
				oColumn:ComputedField := "%0"
				oColumn:FormatColumn := "dateF(value) replace `/` with `-`"
			oColumn1 := oColumns:Add("Format.2")
				oColumn1:ComputedField := "%0"
				oColumn1:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn1:FormatColumn := "`<b>`+ shortdate(value) + `</b> ` + timeF(value)"
			oColumn2 := oColumns:Add("Format.3")
				oColumn2:ComputedField := "%0"
				oColumn2:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn2:FormatColumn := "` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) ) + `</b> ` + ( dateF(value) replace `/` with `-` )"
		oItems := oGantt:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("01/02/2001 10:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
843
How can I remove all bars from the chart
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K2")
			oItems:ClearBars(0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
842
How can I change the color for all bars with a specified key

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",0,"K1",513/*exBarColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
841
Is there any automatic way to change a property for all bars with a specified key

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",0,"K1",513/*exBarColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
840
How can I remove all bars with specified key

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Task")
		oGantt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","K2")
			oItems:RemoveBar(0,"K1")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
839
How can I find if there is any filter applied to the control

PROCEDURE OnFilterChange(oGantt)
	DevOut( "If negative, the filter is present, else not" )
	DevOut( Transform(oGantt:Items:VisibleItemCount(),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:FilterChange := {|| OnFilterChange(oGantt)} /*Occurs when the filter was changed.*/

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:TreeColumnIndex := -1
		oGantt:FilterInclude := 4/*exMatchingItemsOnly*/
		oColumn := oGantt:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "C1"
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
		oGantt:ApplyFilter()
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
838
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:TreeColumnIndex := -1
		oGantt:FilterInclude := 4/*exMatchingItemsOnly*/
		oColumn := oGantt:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "C1|C2"
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
		oGantt:ApplyFilter()
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
837
Is there any method to get only the matched items and not the items with his parent

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:FilterInclude := 4/*exMatchingItemsOnly*/
		oColumn := oGantt:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "C1|C2"
		oItems := oGantt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
		oGantt:ApplyFilter()
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
836
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oGantt:Layout := "Select=" + CHR(34) + "0" + CHR(34) + ";SingleSort=" + CHR(34) + "C0:2" + CHR(34) + ";Columns=1"
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
835
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Column")
		oItems := oGantt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oGantt:Layout := "gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAGQAqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0jE3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI="
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
834
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oGantt:SetProperty("BackColorHeader",0x1000000)
		oGantt:SetProperty("Background",32/*exCursorHoverColumn*/,0x12d86ff)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
833
Is it possible to change the visual appearance of the columns selector/floating bar(3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oGantt:VisualAppearance():Add(2,"c:\exontrol\images\normal.ebn")
		oGantt:VisualAppearance():Add(3,"c:\exontrol\images\pushed.ebn")
		oGantt:SetProperty("Background",92/*exColumnsFloatAppearance*/,0x2000000)
		oGantt:SetProperty("Background",87/*exColumnsFloatBackColor*/,0x3000000)
		oGantt:SetProperty("Background",93/*exColumnsFloatCaptionBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 246,245,240 } )  , .F. ))
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
832
Is it possible to change the visual appearance of the columns selector/floating bar(2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oGantt:VisualAppearance():Add(3,"c:\exontrol\images\pushed.ebn")
		oGantt:SetProperty("Background",87/*exColumnsFloatBackColor*/,0x3000000)
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
831
Is it possible to change the visual appearance of the columns selector/floating bar(1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:VisualAppearance():Add(2,"c:\exontrol\images\normal.ebn")
		oGantt:SetProperty("Background",92/*exColumnsFloatAppearance*/,0x2000000)
		oGantt:SetProperty("Background",87/*exColumnsFloatBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 246,245,240 } )  , .F. ))
		oGantt:SetProperty("Background",93/*exColumnsFloatCaptionBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 246,245,240 } )  , .F. ))
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
830
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
829
Is it possible to list a column to columns selector/floating bar, but still user can use it

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
			oColumn := oColumns:Add("Column 3")
				oColumn:Visible := .F.
				oColumn:Enabled := .F.
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
828
How can I prevent a specific column not to be listed in the columns selector/floating bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
			oColumn := oColumns:Add("Column 3")
				oColumn:Visible := .F.
				oColumn:AllowDragging := .F.
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
827
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oGantt:SetProperty("Description",26/*exColumnsFloatBar*/,"Hidden Columns")
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
826
How can I show the columns selector, so the user can drag and drop columns to the view

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:ColumnAutoResize := .F.
		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oGantt:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
825
The column's header is changed while the cursor hovers it. Is it possible to prevent that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumns := oGantt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oGantt:SetProperty("Background",32/*exCursorHoverColumn*/,-1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
824
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:ScrollBars := 15/*exDisableBoth*/
		oGantt:Chart():ToolTip := ""
		oGantt:SetProperty("ScrollPartVisible",0/*exVScroll*/,65536/*exExtentThumbPart*/,.T.)
		oGantt:SetProperty("ScrollPartVisible",1/*exHScroll*/,65536/*exExtentThumbPart*/,.T.)
		oGantt:SetProperty("ScrollPartVisible",2/*exHChartScroll*/,65536/*exExtentThumbPart*/,.T.)
		oGantt:ScrollWidth := 4
		oGantt:SetProperty("Background",276/*exVSBack*/,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oGantt:SetProperty("Background",260/*exVSThumb*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oGantt:ScrollHeight := 4
		oGantt:SetProperty("Background",404/*exHSBack*/,oGantt:Background(276/*exVSBack*/))
		oGantt:SetProperty("Background",388/*exHSThumb*/,oGantt:Background(260/*exVSThumb*/))
		oGantt:SetProperty("Background",511/*exScrollSizeGrip*/,oGantt:Background(276/*exVSBack*/))
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
823
How can I display the Year in Thai, Buddhist, Korean format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:FirstWeekDay := oChart:LocFirstWeekDay()
			oChart:MonthNames := oChart:LocMonthNames()
			oChart:WeekDays := oChart:LocWeekDays()
			oChart:AMPM := oChart:LocAMPM()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:UnitScale := 4096/*exDay*/
			oLevel := oChart:Level(0)
				oLevel:Label := "<%mmmm%> <%d%>, <%loc_yyyy%> <r><%ww%>"
				oLevel:Unit := 256/*exWeek*/
				oLevel:ToolTip := oLevel:Label()
			oChart:ToolTip := "<%ddd%> <%m%>/<%d%>/<%loc_yyyy%>"
		oGantt:SetProperty("Description",17/*exFilterBarDateMonths*/,oGantt:Chart:MonthNames())

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
822
How does localization work

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oChart := oGantt:Chart()
			oChart:FirstWeekDay := oChart:LocFirstWeekDay()
			oChart:MonthNames := oChart:LocMonthNames()
			oChart:WeekDays := oChart:LocWeekDays()
			oChart:AMPM := oChart:LocAMPM()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
821
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oGantt:MarkSearchColumn := .F.
		oColumns := oGantt:Columns()
			oColumn := oColumns:Add("Car")
				oColumn:DisplayFilterButton := .T.
				oColumn:FilterType := 240/*exFilter*/
				oColumn:Filter := "MAZDA"
			oColumn1 := oColumns:Add("Equipment")
				oColumn1:DisplayFilterButton := .T.
				oColumn1:DisplayFilterPattern := .F.
				oColumn1:CustomFilter := "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
				oColumn1:FilterType := 3/*exPattern*/
				oColumn1:Filter := "AIR BAG"
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag")
			oItems:SetProperty("CellCaption",oItems:AddItem("Toyota"),1,"Air Bag,Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Ford"),1,"Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Nissan"),1,"Air Bag,ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag, ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"ABS,ESP")
		oGantt:ApplyFilter()
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
820
How can I have a case-sensitive filter

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oGantt:MarkSearchColumn := .F.
		oColumns := oGantt:Columns()
			oColumn := oColumns:Add("Car")
				oColumn:DisplayFilterButton := .T.
				oColumn:FilterType := 496/*exFilterDoCaseSensitive+exFilter*/
				oColumn:Filter := "Mazda"
			oColumn1 := oColumns:Add("Equipment")
				oColumn1:DisplayFilterButton := .T.
				oColumn1:DisplayFilterPattern := .F.
				oColumn1:CustomFilter := "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
				oColumn1:FilterType := 259/*exFilterDoCaseSensitive+exPattern*/
				oColumn1:Filter := "Air Bag"
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag")
			oItems:SetProperty("CellCaption",oItems:AddItem("Toyota"),1,"Air Bag,Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Ford"),1,"Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Nissan"),1,"Air Bag,ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag, ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"ABS,ESP")
		oGantt:ApplyFilter()
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
819
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

PROCEDURE OnSelectionChanged(oGantt)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:ClearItemBackColor(0)
		oItems:SetProperty("ItemBackColor",oItems:SelectedItem(0),AutomationTranslateColor( GraMakeRGBColor  ( { 128,255,255 } )  , .F. ))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:SelectionChanged := {|| OnSelectionChanged(oGantt)} /*Fired after a new item has been selected.*/

		oGantt:BeginUpdate()
		oGantt:MarkSearchColumn := .F.
		oGantt:SetProperty("SelForeColor",oGantt:ForeColor())
		oGantt:SetProperty("SelBackColor",oGantt:BackColor())
		oGantt:ShowFocusRect := .F.
		oColumns := oGantt:Columns()
			oColumn := oColumns:Add("Format")
				oColumn:FormatColumn := "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oGantt:Items()
			oItems:AddItem(10)
			oItems:AddItem(-8)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
818
How do I hide the selection
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:MarkSearchColumn := .F.
		oGantt:SetProperty("SelForeColor",oGantt:ForeColor())
		oGantt:SetProperty("SelBackColor",oGantt:BackColor())
		oGantt:ShowFocusRect := .F.
		oColumns := oGantt:Columns()
			oColumn := oColumns:Add("Format")
				oColumn:FormatColumn := "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oGantt:Items()
			oItems:AddItem(10)
			oItems:AddItem(-8)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
817
How do I access the cells, or how do I get the values in the columns
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumns := oGantt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
		oItems := oGantt:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("CellCaption",h,1,"SubItem 1.1")
			oItems:SetProperty("CellCaption",h,2,"SubItem 1.2")
			DevOut( Transform(oItems:CellCaption(h,2),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
816
How can I change the check-boxes appearance

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oAppearance
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oGantt:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oGantt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oAppearance := oGantt:VisualAppearance()
			oAppearance:Add(1,"XP:Button 3 12")
			oAppearance:Add(2,"XP:Button 3 11")
			oAppearance:Add(3,"XP:Button 3 10")
		oGantt:SetProperty("CheckImage",0/*Unchecked*/,16777216)
		oGantt:SetProperty("CheckImage",1/*Checked*/,33554432)
		oGantt:SetProperty("CheckImage",2/*PartialChecked*/,50331648)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
815
How can I load my table from an Access 2007, using ADO

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
814
Is it possible display numbers in the same format no matter of regional settings in the control panel

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Def"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oGantt:Items()
			h := oItems:AddItem(666666.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default positive)'")
			h := oItems:AddItem(666666.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '2|.|3|,|1|1')")
			h := oItems:AddItem(-666666.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default negative)'")
			h := oItems:AddItem(-666666.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '2|.|3|,|1|1')")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
813
The right pane needs to show ONLY the hours 6am to 9pm (every hour) for one day only and the user should not to be able to scroll left or right nor see any other hours. How can I do that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Columns():Add("Tasks")
		oChart := oGantt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
			oChart:SetProperty("ScrollRange",1/*exEndDate*/,"01/01/2001")
			oChart:UnitScale := 65536/*exHour*/
			oChart:NonworkingHours := 12582975
			oChart:ShowNonworkingUnits := .F.
			oChart:Level(0):Alignment := 17/*exHOutside+CenterAlignment*/
			oChart:UnitWidth := 18
			oChart:SetProperty("PaneWidth",.T.,294)
			oChart:ScrollBar := .F.
		oGantt:OnResizeControl := 128/*exDisableSplitter*/
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
812
Can I use ebn files to display the selected dates

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oAppearance := oGantt:VisualAppearance()
			oAppearance:Add(2,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(1,"CP:2 0 -4 0 4")
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())
			oChart:LevelCount := 2
			oChart:SetProperty("MarkSelectDateColor",0x1000000)
			oChart:SelectLevel := 1
			oChart:SetProperty("SelectDate","01/03/2008",.T.)
			oChart:SetProperty("SelectDate","01/04/2008",.T.)
		oGantt:Columns():Add("Default")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2008","01/06/2008")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/03/2008","01/07/2008")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/04/2008","01/08/2008")
			oItems:AddBar(oItems:AddItem("Item 4"),"Task","01/05/2008","01/09/2008")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
811
Can I use ebn files to display the selected dates

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())
			oChart:LevelCount := 2
			oChart:SetProperty("MarkSelectDateColor",0x1000000)
			oChart:SelectLevel := 1
			oChart:SetProperty("SelectDate","01/03/2008",.T.)
		oGantt:Columns():Add("Default")
		oItems := oGantt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2008","01/06/2008")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/03/2008","01/07/2008")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/04/2008","01/08/2008")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
810
How can I change the color for selected dates to be solid

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())
			oChart:LevelCount := 2
			oChart:SetProperty("MarkSelectDateColor",0x7fff0000)
			oChart:SelectLevel := 1
			oChart:SetProperty("SelectDate","01/15/2008",.T.)
			oChart:SetProperty("SelectDate","01/16/2008",.T.)
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
809
How can I add or change the padding (spaces) for captions in the control's header

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oGantt:Columns():Add("Padding-Left"):SetProperty("Def",52/*exHeaderPaddingLeft*/,18)
		oColumn := oGantt:Columns():Add("Padding-Right")
			oColumn:SetProperty("Def",53/*exHeaderPaddingRight*/,18)
			oColumn:HeaderAlignment := 2/*RightAlignment*/
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
808
Do you have any plans to add cell spacing and cell padding to the cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oGantt:DrawGridLines := -1/*exAllLines*/
		oColumn := oGantt:Columns():Add("Padding-Left")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,18)
		oGantt:Columns():Add("No-Padding"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oGantt:Columns():Add("Empty"):Position := 0
		oItems := oGantt:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item A.1"),1,"Item A.2")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item B.1"),1,"Item B.2")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item C.1"),1,"Item C.2")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
807
Is it possible to display information about the firing events
PROCEDURE OnEvent(oGantt,EventID)
	DevOut( Transform(oGantt:EventParam(-2),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Event := {|EventID| OnEvent(oGantt,EventID)} /*Notifies the application once the control fires an event.*/


	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
806
Is it possible to scroll the control's content by clicking and moving the mouse up or down

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access\SAMPLE.MDB",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:AutoDrag := 16/*exAutoDragScroll*/
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
805
How do I load bars from my ADO table/database

PROCEDURE OnAddItem(oGantt,Item)
	LOCAL oItems
	oItems := oGantt:Items()
		oItems:AddBar(Item,"Task",oItems:CellCaption(Item,2),oItems:CellCaption(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:AddItem := {|Item| OnAddItem(oGantt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oGantt:BeginUpdate()
		oChart := oGantt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oGantt:ColumnAutoResize := .F.
		oGantt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access\SAMPLE.MDB",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oGantt:DataSource := rs
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
804
Is it possible to auto-numbering the children items but still keeps the position after filtering

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5,oColumn6
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oGantt:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "Child 2"
		oColumn1 := oGantt:Columns():Add("Pos.1")
			oColumn1:FormatColumn := "1 ropos ''"
			oColumn1:Position := 0
			oColumn1:Width := 32
			oColumn1:AllowSizing := .F.
		oColumn2 := oGantt:Columns():Add("Pos.2")
			oColumn2:FormatColumn := "1 ropos ':'"
			oColumn2:Position := 1
			oColumn2:Width := 32
			oColumn2:AllowSizing := .F.
		oColumn3 := oGantt:Columns():Add("Pos.3")
			oColumn3:FormatColumn := "1 ropos ':|A-Z'"
			oColumn3:Position := 2
			oColumn3:Width := 32
			oColumn3:AllowSizing := .F.
		oColumn4 := oGantt:Columns():Add("Pos.4")
			oColumn4:FormatColumn := "1 ropos '|A-Z|'"
			oColumn4:Position := 3
			oColumn4:Width := 32
			oColumn4:AllowSizing := .F.
		oColumn5 := oGantt:Columns():Add("Pos.5")
			oColumn5:FormatColumn := "'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'"
			oColumn5:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn5:Position := 4
			oColumn5:Width := 32
			oColumn5:AllowSizing := .F.
		oColumn6 := oGantt:Columns():Add("Pos.6")
			oColumn6:FormatColumn := "'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'"
			oColumn6:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn6:Position := 5
			oColumn6:Width := 48
			oColumn6:AllowSizing := .F.
		oItems := oGantt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oGantt:ApplyFilter()
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
803
Is it possible to auto-numbering the children items too

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:BeginUpdate()
		oGantt:Chart():SetProperty("PaneWidth",.T.,0)
		oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
		oGantt:Columns():Add("Items")
		oColumn := oGantt:Columns():Add("Pos.1")
			oColumn:FormatColumn := "1 rpos ''"
			oColumn:Position := 0
			oColumn:Width := 32
			oColumn:AllowSizing := .F.
		oColumn1 := oGantt:Columns():Add("Pos.2")
			oColumn1:FormatColumn := "1 rpos ':'"
			oColumn1:Position := 1
			oColumn1:Width := 32
			oColumn1:AllowSizing := .F.
		oColumn2 := oGantt:Columns():Add("Pos.3")
			oColumn2:FormatColumn := "1 rpos ':|A-Z'"
			oColumn2:Position := 2
			oColumn2:Width := 32
			oColumn2:AllowSizing := .F.
		oColumn3 := oGantt:Columns():Add("Pos.4")
			oColumn3:FormatColumn := "1 rpos '|A-Z|'"
			oColumn3:Position := 3
			oColumn3:Width := 32
			oColumn3:AllowSizing := .F.
		oColumn4 := oGantt:Columns():Add("Pos.5")
			oColumn4:FormatColumn := "'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'"
			oColumn4:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn4:Position := 4
			oColumn4:Width := 32
			oColumn4:AllowSizing := .F.
		oColumn5 := oGantt:Columns():Add("Pos.6")
			oColumn5:FormatColumn := "'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'"
			oColumn5:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn5:Position := 5
			oColumn5:Width := 48
			oColumn5:AllowSizing := .F.
		oItems := oGantt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oGantt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
802
Is there any way to add auto-numbering

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oColumns := oGantt:Columns()
			oColumns:Add("Items")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "1 pos ''"
				oColumn:Position := 0
		oItems := oGantt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
801
How can I format my column to display the percent values “5,00%”

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGantt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGantt := XbpActiveXControl():new( oForm:drawingArea )
	oGantt:CLSID  := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
	oGantt:create(,, {10,60},{610,370} )

		oGantt:Columns():Add("Percent"):FormatColumn := "((dbl(value) * 100) format '2|,|3.')+'%'"
		oItems := oGantt:Items()
			oItems:AddItem(0.5)
			oItems:AddItem(0.4)
			oItems:AddItem(0.75)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN